interface ApiRes<T>{
    code: number,
    data: T,
    message:string
}
interface User{
    nickname: string,
    avatar:string
}

const res: ApiRes<User> = {
    code: 200,
    data: {
        nickname: 'dfj',
        avatar:'http://fosjdf.png'
    },
    message:'获取个人信息'
}
console.log(res);

interface Swiper{
    bannerid: string,
    img:string 
}
const res2: ApiRes<Swiper[]> = {
    code: 200,
    data: [{
        bannerid: '1001',
        img:'http://ffodj.png'
    },{
        bannerid: '1001',
        img:'http://ffodj.png'
        },
        {
            bannerid: '1001',
            img:'http://ffodj.png'
        },
    ],
    message:'查看轮播图'
}
console.log(res2);


export{}